package com.share.wechat.core.service;

import com.share.wechat.core.entity.UserDetail;

import javax.validation.constraints.NotNull;

public interface UserDetailService {

    UserDetail findByCode(@NotNull String code);

    /**
     * 添加一个userDetail
     * @param userDetail userDetail
     */
    void addOne(UserDetail userDetail);

    /**
     * 拿到完整的第三方用户数据
     * @param code code
     * @return UserDetail
     */
    UserDetail getUserInfo(@NotNull String code);

    /**
     * 根据id查找一个
     * @param id id
     * @return UserDetail
     */
    UserDetail getById(String id);


}
